<template>
  <div class="adviserDetail">
    <div class="content">
      <van-cell-group>
        <van-cell title="项目名称" :value="dataList.projectName" />
        <van-cell title="所属企业" :value="dataList.industry" />
        <van-cell title="负责角色" :value="dataList.position" />
        <van-cell title="状态">
          <div v-if="dataList.status = 0">
            <p>启用</p>
          </div>
          <div v-if="dataList.status = 1">
            <p>禁用</p>
          </div>
        </van-cell>
        <div class="grade">
          <van-cell title="(企业)评价" value style="width:70%" />
          <div v-if="dataList.enterpriseScore !==0">
            <van-rate v-model="dataList.enterpriseScore" color="#ffd21e" :size="15" />
          </div>
          <div v-if="dataList.enterpriseScore === 0">
            <el-button type="text">暂无评分</el-button>
          </div>
        </div>
        <div class="grade">
          <van-cell title="(管理员)评价" value style="width:70%" />
          <div v-if="dataList.adminScore !==0">
            <van-rate v-model="dataList.adminScore" color="#ffd21e" :size="15" />
          </div>
          <div v-if="dataList.adminScore === 0">
            <el-button type="text">暂无评分</el-button>
          </div>
        </div>
        <div class="grade">
          <van-cell title="文件项目" style="width:70%" />
          <div v-if="dataList.docFilesUrlPro !== '文件暂缺'">
            <a :href="dataList.docFilesUrlPro">
              <el-button type="text" icon="el-icon-download">下载</el-button>
            </a>
          </div>
          <div v-if="dataList.docFilesUrlPro === '文件暂缺'">
            <el-button type="text">文件暂缺</el-button>
          </div>
        </div>
        <div class="grade">
          <van-cell title="需求项目" style="width:70%" />
          <div v-if="dataList.docFilesUrlDem !== '文件暂缺'">
            <a :href="dataList.docFilesUrlDem">
              <el-button type="text" icon="el-icon-download">下载</el-button>
            </a>
          </div>
          <div v-if="dataList.docFilesUrlDem === '文件暂缺'">
            <el-button type="text">文件暂缺</el-button>
          </div>
        </div>
      </van-cell-group>
    </div>
  </div>
</template>

<script>
export default {
  created() {
    // console.log(this.$route.query.info);
    this.dataList = this.$route.query.info;
  },
  data() {
    return {
      dataList: {}
    };
  }
};
</script>

<style>
a {
  text-decoration: none;
  color: black;
}
.adviserDetail {
  width: 85%;
  margin: 0 auto;
}
.adviserDetail .content .grade {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>